package com.guigu.guliware.controller;


import com.guigu.gulicommon.entity.pojo.res.Res;
import com.guigu.gulicommon.entity.vo.FareVo;
import com.guigu.guliware.service.IWmsWareInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 仓库信息 前端控制器
 * </p>
 *
 * @author 陈俊杰
 * @since 2024-08-24
 */
@RestController
@RequestMapping("/wms-ware-info")
public class WmsWareInfoController {
    @Autowired
    private IWmsWareInfoService iWmsWareInfoService;

    /**
     * 根据地址id获取运费信息
     *
     * @param addrId 收货地址id
     * @return 邮费信息
     */
    @GetMapping("/fare")
    public Res<FareVo> getFareByAddrId(@RequestParam("addrId") Long addrId) {
        return iWmsWareInfoService.getFare(addrId);
    }
}

